<?php

namespace App\Commons\Libs\KafkaPHP\Commands;

use Illuminate\Console\Command;
use App\Commons\Libs\KafkaPHP\Consumer;
use App\Commons\Libs\KafkaPHP\KafkaConfig;

class KafkaConsumerCommand extends Command
{
    protected $signature = 'kafka:consumer {topics*} {--g|group= : test}';
    protected $description = 'kafka消费者';

    public function handle()
    {
        $topics = $this->argument('topics');
        $group = $this->option('group');
        // dump($this->argument('topic'), $this->option('group'));
        app('kafka')->consumer($group, $topics);
    }
}
